Micron Document
`:top
Un `!script shell`! est un `F33f`_`[programme informatique`:/page/wikibook/entry.mu`zim=wikipedia_fr_all_nopic_2025-10.zim|entry_path=Programme_informatique]`_`f développé pour fonctionner dans un `F33f`_`[interpréteur de commandes`:/page/wikibook/entry.mu`zim=wikipedia_fr_all_nopic_2025-10.zim|entry_path=Interpréteur_de_commandes]`_`f `F33f`_`[shell Unix`:/page/wikibook/entry.mu`zim=wikipedia_fr_all_nopic_2025-10.zim|entry_path=Shell_Unix]`_`f`:cite-ref-1[`F5bf`_`[1`#cite-note-1]`_`f]. Il utilise des `F33f`_`[commandes de terminal`:/page/wikibook/entry.mu`zim=wikipedia_fr_all_nopic_2025-10.zim|entry_path=Commandes_Unix]`_`f comme code. Un shell script est un fichier finissant avec l'extension `B100`F9d9.sh`f`b.

Le terme est aussi utilisé de façon plus large pour désigner l'utilisation automatisée d'une `F33f`_`[interface système`:/page/wikibook/entry.mu`zim=wikipedia_fr_all_nopic_2025-10.zim|entry_path=Interface_système]`_`f (`*shell`*) ; chaque système d'exploitation utilise une dénomination particulière pour ces fonctions notamment `F33f`_`[batch files`:/page/wikibook/entry.mu`zim=wikipedia_fr_all_nopic_2025-10.zim|entry_path=.bat]`_`f (pour `F33f`_`[MS-DOS`:/page/wikibook/entry.mu`zim=wikipedia_fr_all_nopic_2025-10.zim|entry_path=MS-DOS]`_`f-`F33f`_`[Win95`:/page/wikibook/entry.mu`zim=wikipedia_fr_all_nopic_2025-10.zim|entry_path=Windows_95]`_`f, `F33f`_`[OS/2`:/page/wikibook/entry.mu`zim=wikipedia_fr_all_nopic_2025-10.zim|entry_path=OS/2]`_`f), `*procedure commands`* (VMS) et scripts shell.

Les shells les plus courants pour les systèmes Unix ou `F33f`_`[type Unix`:/page/wikibook/entry.mu`zim=wikipedia_fr_all_nopic_2025-10.zim|entry_path=Type_Unix]`_`f sont le `F33f`_`[Korn shell`:/page/wikibook/entry.mu`zim=wikipedia_fr_all_nopic_2025-10.zim|entry_path=Korn_shell]`_`f (ksh), le `F33f`_`[Bourne shell`:/page/wikibook/entry.mu`zim=wikipedia_fr_all_nopic_2025-10.zim|entry_path=Bourne_shell]`_`f (bsh) et `F33f`_`[Bourne-Again shell`:/page/wikibook/entry.mu`zim=wikipedia_fr_all_nopic_2025-10.zim|entry_path=Bourne-Again_shell]`_`f (bash). Mêle pour des systèmes ayant un shell différent, tel que `F33f`_`[Zsh`:/page/wikibook/entry.mu`zim=wikipedia_fr_all_nopic_2025-10.zim|entry_path=Zsh]`_`f sur `F33f`_`[macOS`:/page/wikibook/entry.mu`zim=wikipedia_fr_all_nopic_2025-10.zim|entry_path=MacOS]`_`f, ces shells sont présents pour assurer la `F33f`_`[rétro-compatibilité`:/page/wikibook/entry.mu`zim=wikipedia_fr_all_nopic_2025-10.zim|entry_path=Compatibilité_ascendante_et_descendante]`_`f`:cite-ref-2[`F5bf`_`[2`#cite-note-2]`_`f].

>>Contents

• `F0af`_`[Histoire`#histoire]`_`f
• `F0af`_`[Exemple`#exemple]`_`f
• `F0af`_`[Notes et références`#notes-et-r-f-rences]`_`f

-─

>>Histoire

Le shell script a été créé en même temps que l'`F33f`_`[Interpréteur de commandes`:/page/wikibook/entry.mu`zim=wikipedia_fr_all_nopic_2025-10.zim|entry_path=Interpréteur_de_commandes]`_`f `F33f`_`[BSH`:/page/wikibook/entry.mu`zim=wikipedia_fr_all_nopic_2025-10.zim|entry_path=Bourne_shell]`_`f en 1977. Il était conçu pour exécuter plusieurs commandes plus rapidement et simplement.

>>Exemple

`B100`F9d9echo "Hello World"`f`b
`B100`F9d9read -p "Quel est votre nom ?" name`f`b
`B100`F9d9echo "Votre nom est $name"`f`b

>>Notes et références

`:cite-note-1`!1.`! `F0af`_`[↑`#cite-ref-1]`_`f `:kernighanpike1984`a`:brian-w-kernighanrob-pike1984`a`F33f`_`[Brian W. Kernighan`:/page/wikibook/entry.mu`zim=wikipedia_fr_all_nopic_2025-10.zim|entry_path=Brian_Kernighan]`_`f et Rob Pike, The UNIX Programming Environment, Prentice Hall, Inc., 1984 (`F33f`_`[ISBN`:/page/wikibook/entry.mu`zim=wikipedia_fr_all_nopic_2025-10.zim|entry_path=International_Standard_Book_Number]`_`f 0-13-937699-2), « 3. Using the Shell », p. 94 :« The shell is actually a programming language: it has variables, loops, decision-making, and so on. »
`:cite-note-2`!2.`! `F0af`_`[↑`#cite-ref-2]`_`f `:robbins-and-nelson-h-f-beebe2005`a`:arnold-robbins-and-nelson-h-f-beebe2005`aArnold Robbins and Nelson H.F. Beebe, Classic Shell Scripting, O'Reilly Media, 2005 (`F33f`_`[ISBN`:/page/wikibook/entry.mu`zim=wikipedia_fr_all_nopic_2025-10.zim|entry_path=International_Standard_Book_Number]`_`f 978-0-596-00595-5), p. 5

• Portail de la programmation informatique

`c`F0af`_`[↑ Back to top`#top]`_`f`a